package com.axin.blog.mapper;

import com.axin.blog.api.domain.BlogCategory;
import com.axin.blog.api.domain.BlogComment;
import com.axin.common.mybatis.core.BaseMapperPlus;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 博客评论 数据层
 *
 * @Author axin
 * @Date 2021/10/29 19:49
 */
public interface BlogCommentMapper extends BaseMapperPlus<BlogComment> {

    /**
     * 根据条件分页查询评论
     *
     * @param page
     * @param comment
     * @return
     */
    Page<BlogComment> selectPageBlogCommentList(@Param("page") Page<BlogComment> page,
                                                  @Param("comment") BlogComment comment);

    /**
     * 根据条件查询评论列表
     *
     * @param comment
     * @return
     */
    List<BlogComment> selectBlogCommentList(@Param("comment") BlogComment comment);

    /**
     * 根据父id查询
     * @param parentId
     * @return
     */
    List<BlogComment> selectPageBlogCommentListByParentId(@Param("parentId") Long parentId);
}
